/* Reset / base */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: #fff;
  font-family: Arial, sans-serif;
  text-align: center;
  padding: 2rem;
}

/* Heading styling with big chunky font and background image clipped into text */
h1 {
  font-size: 14svw;
  line-height: 12svw;
  text-transform: uppercase;
  background-image: url('../images/3-cats.avif');
  background-size: cover;
  background-position: 50% 25%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-align: center;
  margin-bottom: 4rem;
  transition: background-position 1s ease;
}

/* Flex container for the three boxes */
.three-boxes {
  display: flex;
  flex-flow: row wrap;
  justify-content: space-around;
  gap: 2rem;
}

/* Each box styling */
.box {
  flex: 0 0 20%;
  position: relative;
  aspect-ratio: 1 / 1;
  border: 4px solid hotpink;
  overflow: hidden;
  transform: rotate(45deg);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Figure inside each box holds the background image */
.box figure {
  width: 100%;
  height: 100%;
  margin: 0;
  background-image: url('../images/3-cats.avif');
  background-size: 500%;
  background-position: center center; /* default center */
  transform: rotate(-45deg);
  transition: all 0.6s ease;
}

/* Individual boxes positioning adjustments */
.box1 figure { background-position: 18% 38%; }  /* shift left box a bit left */
.box2 figure { background-position: 50% 40%; }  /* shift middle image down */
.box3 figure { background-position: 75% 50%; }  /* shift right box a bit right */

/* Hover effect with scale and shadow for polish */
.box:hover {
  transform: rotate(45deg) scale(1.05);
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

.box:hover figure {
  filter: grayscale(30%);
  background-position: center 45%;
}

/* Gradient background */
body::before {
  content: "";
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: linear-gradient(135deg, #ff8a00, #e52e71);
  z-index: -1;
  opacity: 0.2;
}
/* Back link styling */
.back-link {
  margin-top: 4rem;
  display: inline-block;
  padding: 0.5rem 1rem;
  border: 2px solid hotpink; /* matches your box color */
  border-radius: 8px;
  background-color: #fff;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.back-link a {
  text-decoration: none;
  color: hotpink;
  font-weight: bold;
  font-size: 1rem;
}

.back-link:hover {
  background-color: hotpink;
}

.back-link:hover a {
  color: #fff;
}/* Back link styling */
.back-link {
  margin: 6rem auto 0; /* pushes it further down, center horizontally */
  display: inline-block;
  padding: 0.5rem 1rem;
  border: 2px solid hotpink;
  border-radius: 8px;
  background-color: #fff;
  transition: background-color 0.3s ease, color 0.3s ease;
  text-align: center;
}

.back-link a {
  text-decoration: none;
  color: hotpink;
  font-weight: bold;
  font-size: 1rem;
}

.back-link:hover {
  background-color: hotpink;
}

.back-link:hover a {
  color: #fff;
}